<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title>平台系统设置-系统设置</title>
<%@ include file="/WEB-INF/jsp/common/inc.jsp" %>
<script type="text/javascript">
$(function (){
	
	//alert("${configure}");
	
	if("${configure}" != ""){
		$("#configure").val("${configure}");
	}
	
	$("#customCode").val("${customCode}");
	var KtplugInSwitch = "${KtplugInSwitch}";
	$("#KtplugInSwitch").val(KtplugInSwitch);
	
	$("#submit").click(function (){
		$.ajax({
			url : "${_baseUrl}/system/save",
			type : "post",
			dataType : "json",
			async : false,//** ！重要 同步请求。效果:ajax未进行则其他代码不运行
	  		data : {customCode:$("#customCode").val(),
	  				configure:$("#configure").val(),
		  			ftpIP:$("#ftpIP").val(),
		  			ftpUserName:$("#ftpUserName").val(),
		  			ftpPwd:$("#ftpPwd").val(),
		  			tqServerUrl:$("#tqServerUrl").val(),
		  			userCodePre:$("#userCodePre").val(),
		  			platformPwdLevel:$("#platformPwdLevel").val(),
		  			KtplugInSwitch:$("#KtplugInSwitch").val(),
					isLoginIp:$("#isLoginIp").val()
	  		       },
			success : function(json) {
				layer.msg(json.message);
			},
			error:function(data){
				layer.msg("系统错误,请联系管理员");
			}
		});
	});
})

</script>
</head>
<body>
	<div class="submenu">
	    <div  class="func_header">
	        <span title="基础设置>KT基础设置">当前位置 ： <a href="javascript:;">基础设置</a> > KT基础设置</span>
	    </div>
	    
	    <div style="overflow: auto; width:98%;margin: auto;">   
	        <table class="table table-bordered table_inline" id="modelList">
	        	<!-- <tr>
	        		<td>客户标识:</td>
	        		<td>
	        			<select id="customCode" name="customCode">
	        			    <option value="keyware">keyware</option>
                            <option value="huayin">华阴</option>
                            <option value="tianjin712suo">天津712所</option>
                            <option value="siyuan17suo">北京四院17所</option>
	        			</select>
	        		</td>
	        	</tr> -->
	        	<%-- <tr>
	        		<td>系统密级:</td>
	        		<td>	        		
                    	<select id="platformPwdLevel" name="platformPwdLevel">
	             			<option value="platform" <c:if test="${platformPwdLevel eq 'platform' }">selected="selected"</c:if>>平台密级</option>
	             			<option value="user" <c:if test="${platformPwdLevel eq 'user' }">selected="selected"</c:if>>用户密级</option>
	        			</select>
                    </td>
	        	</tr> --%>
	        	<tr>
	        		<td>开始配置管理:</td>
	        		<td>
	        			<select id="configure" name="configure">
	        				<option value="0">开启</option>
	        				<option value="1">关闭 </option>
	        			</select>
	        		</td>
	        	</tr>
	        	<!-- <tr>
	        		<td>切换文档编辑控件:</td>
	        		<td>
	        			<select id="KtplugInSwitch" name="KtplugInSwitch">
	        				<option value="NTKO">NTKO</option>	
					        <option value="pageOffice">pageOffice</option>
	        			</select>
	        		</td>
	        	</tr> -->
	        	<tr>
	        		<td>用户编码前缀:</td>
	        		<td>
	        			<div class="">
                        	<input type="text" id="userCodePre" name="userCodePre" class="nav_input" value="${userCodePre }" placeholder="请输入...">
                    	</div>
                    </td>
	        	</tr>
	        	<tr>
	        		<td>FTP站点IP:</td>
	        		<td>
	        			<div class="">
                        	<input type="text" id="ftpIP" name="ftpIP" class="nav_input" value="${ftpIP }" placeholder="请输入...">
                    	</div>
	        		</td>
	        	</tr>
	        	<tr>
	        		<td>FTP账号:</td>
	        		<td>
	        			<div class="">
                        	<input type="text" id="ftpUserName" name="ftpUserName" class="nav_input" value="${ftpUserName }" placeholder="请输入...">
                    	</div>
	        		</td>
	        	</tr>
	        	<tr>
	        		<td>FTP密码:</td>
	        		<td>
	        			<div class="">
                        	<input type="text" id="ftpPwd" name="ftpPwd" class="nav_input" value="${ftpPwd }" placeholder="请输入...">
                    	</div>
                    </td>
	        	</tr>
	        	<tr>
	        		<td>本地webService服务地址:</td>
	        		<td>
	        			<div class="">
                        	<input type="text" id="ktServerUrl" name="ktServerUrl" class="nav_input" value="${ktServerUrl }" readonly="readonly">
                    	</div>
                    </td>
	        	</tr>
	        	<tr>
	        		<td>TQ端webService服务地址:</td>
	        		<td>
	        			<div class="">
                        	<input type="text" id="tqServerUrl" name="tqServerUrl" class="nav_input" value="${tqServerUrl }" placeholder="请输入...">
                    	</div>
                    </td>
	        	</tr>
				<%-- <tr>
					<td>是否限制用户登录iP:</td>
					<td>
						<select id="isLoginIp" name="isLoginIp">
							<option value="0" <c:if test="${isLoginIp eq '0' }">selected="selected"</c:if>>不限制</option>
							<option value="1" <c:if test="${isLoginIp eq '1' }">selected="selected"</c:if>>限制</option>
						</select>
					</td>
				</tr> --%>
			</table> 
		</div>           
    </div>
    <div class="important_Preservation">
		<shiro:hasPermission name="system:save">
	    <a href="javascript:;"  id="submit">保存</a>
		</shiro:hasPermission>
		<shiro:hasPermission name="system:close">
	    <a href="javascript:;"  id="cancel">取 消</a>
		</shiro:hasPermission>
	</div>
</body>
</html>